<?php
use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),       // admin
	'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),   //['web', 'admin']
], function (Router $router) {
        $router->resource('auth/roles', 'RoleController')->names('admin.auth.roles');
        $router->resource('auth/permissions', 'PermissionController')->names('admin.auth.permissions');
        $router->resource('auth/menu', 'MenuController', ['except' => ['create']])->names('admin.auth.menu');

		$router->resource('auth/users', 'UserController')->names('admin.auth.users');
		$router->get('auth/users/{id}/setrole', 'UserController@setRole');




		$router->get('tests', function(){
			dump(get_backend_menu('vip'));
			return ;
		});

		$router->get('/', 'HomeController@index')->name('admin.home');
});

include app_path("Admin/app.php");

